from flask import current_app, jsonify
from flask import session
# from api import create_app, db, models
from flask_migrate import Migrate
from flask_migrate import MigrateCommand
from flask_script import Manager

from api import create_app, db, models

app = create_app("develop")

manager = Manager(app)
# 使用Migrate关联app,db
Migrate(app, db)
# 给manager添加一条操作命令
manager.add_command("db", MigrateCommand)

# 别忘了给自己的参数加runserver哦!!!
if __name__ == '__main__':
    print(app.url_map)
    manager.run()
